package com.baichuan.service;

import com.baichuan.entity.CmsRequestLog;
import com.baichuan.entity.sys.Log;
import com.baichuan.mapper.CmsRequestLogMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Service;

/**
 * @Auther: leo
 * @Date: 2020/04/10 21:31
 * @Description: 用户请求日志Service
 */
@Service
@EnableAsync
public class CmsRequestLogService {
    @Autowired(required = false)
    private CmsRequestLogMapper cmsRequestLogMapper;

    /**
     * 新增请求日志
     *
     * @param log
     */
    @Async
    public void addLog(Log log) {
        cmsRequestLogMapper.insert(log);
    }
}
